﻿@model EnterpriseFund.Model.DM_SWJG
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")

<head>
    <title></title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
    <script type="text/javascript">

        $(document).ready(function () {
            //  $("#toolMenu").smartFloat();
            // var jsAlert = $("#jsAlert").val();
            var jsAlert = '@Request.Params["mes"]'
            if (jsAlert != "") {
                alert(jsAlert);
                window.history.go(-1);
            }
            if (jsAlert == "操作成功") {
                window.location.href = rootPath + '/SWJGManager/Index';
            }
        });

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnSave":
                    {
                        Save();
                        break;
                    }
            }

        }

        function Save() {
            // form1.submit();
            var fPSWJG_DM = tbSWJG_DM.GetText();
            var fPSWJG_MC = tbSWJG_MC.GetText();
            if (pd(fPSWJG_DM, fPSWJG_MC))
            { form1.submit(); }
        }

        function pd(codeNo, codeName) {
            var bl = true;
            if (null == codeNo || ASPxClientUtils.Trim(codeNo) == "") {
                tbSWJG_DM.SetErrorText("请填写税务机构代码");
                tbSWJG_DM.SetIsValid(false);
                bl = false;
            }
            if (null == codeName || ASPxClientUtils.Trim(codeName) == "") {
                tbSWJG_MC.SetErrorText("请填写税务机构名称");
                tbSWJG_MC.SetIsValid(false);
                bl = false;
            }
            return bl;
        }
    </script>
</head>
<body>
    @using (Html.BeginForm("Save", "SWJGManager", FormMethod.Post, new { id = "form1" }))
    {
        @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.Image.Url = Url.Content("~/Content/ControlImages/button_save.png");
       });
       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
        <table class="tableFrom" style=" margin-left:150px;">
            <tr>
                <td style="width: 150">
                    税务机构代码:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_DM";
                   settings.Width = 150;
                   if ((bool)@ViewData["blcodeNo"])
                   {
                       settings.ReadOnly = false;
                   }
                   else
                   {
                       settings.ReadOnly = true;
                   }
                   settings.Text = Model.SWJG_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构名称:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_MC";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_MC;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构简称:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_JC";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_JC;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构标志:
                </td>
                <td>
                    @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbSWJG_BZ";
                   settings.Width = 150;
                   if (Model.SWJG_BZ == "J")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    上级税务代码:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSJ_SWJG_DM";
                   settings.Width = 150;
                   settings.Text = Model.SJ_SWJG_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    纳税人标志:
                </td>
                <td>
                    @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbNSR_SWJG_BZ";
                   settings.Width = 150;
                   if (Model.NSR_SWJG_BZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    机构级次代码:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbJGJC_DM";
                   settings.Width = 150;
                   settings.Text = Model.JGJC_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构局轨:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_JG";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_JG;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构邮编:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_YB";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_YB;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构地址:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_DZ";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_DZ;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    税务机构电话:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_DH";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_DH;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    传真电话:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbCZDH";
                   settings.Width = 150;
                   settings.Text = Model.CZDH;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    电子邮件地址:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbDYDZ";
                   settings.Width = 150;
                   settings.Text = Model.DYDZ;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    行政区划代码:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbXZQH_DM";
                   settings.Width = 150;
                   settings.Text = Model.XZQH_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    负责人:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWJG_FZR_DM";
                   settings.Width = 150;
                   settings.Text = Model.SWJG_FZR_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    特殊纳税人号:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbTS_NSRSBH";
                   settings.Width = 150;
                   settings.Text = Model.TS_NSRSBH;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    有效位数:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbYXWS";
                   settings.Width = 150;
                   settings.Text = Model.YXWS.ToString();
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    级别代码:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbJBDM";
                   settings.Width = 150;
                   settings.Text = Model.JBDM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    级次代码:
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbJCDM";
                   settings.Width = 150;
                   settings.Text = Model.JCDM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150">
                    有效标志:
                </td>
                <td>
                    @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbYXBZ";
                   settings.Width = 150;
                   if (Model.YXBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
        </table>
                      @Html.Hidden("jsAlert", (ViewData["jsAlert"]))
                         @Html.Hidden("isAdd", (ViewData["blcodeNo"]))
    }
    <script>
        lp.Hide();
    </script>
</body>
</html>
